use data_province, clear


*************************************************************************
******************** Table A.5 Behavioral Consequences ******************
*************************************************************************


xtset provid year
// Evidence on collegiality //
eststo clear
eststo m1: xtreg   diff    i.year c.year##i.provid    connected psec_age psec_tenure loggdp logpop  logrev logexp   ///
 collegial psec_benke  if year>=2000 ,fe  robust  cluster(provid)
estadd local yfe "$\checkmark$"

eststo m2: xtreg   diff2    i.year c.year##i.provid  connected psec_age psec_tenure loggdp logpop  logrev logexp   ///
 collegial psec_benke if year>=2000 ,fe  robust  cluster(provid)
estadd local yfe "$\checkmark$"


eststo m3: xtreg  F.case i.year c.year##i.provid connected psec_age psec_tenure loggdp logpop  logrev logexp   ///
 collegial    psec_benke  if year>=2000, fe robust  cluster(provid)
estadd local yfe "$\checkmark$"

eststo m4: xtreg  F.disc i.year c.year##i.provid connected psec_age psec_tenure loggdp logpop  logrev logexp   ///
 collegial  psec_benke   if year>=2000, fe robust  cluster(provid)
estadd local yfe "$\checkmark$"

esttab m1 m2 m3 m4   using out.txt, nonote nobaselevels keep(loggdp logpop  logrev logexp  psec_tenure psec_age ///
collegial psec_benke connected) order(collegial  psec_age psec_tenure psec_benke connected loggdp logpop  logrev logexp) b(3) se(3) ///
star(* 0.1 ** 0.05 *** 0.01) label booktabs replace   ///
mtitles("Prov sec \(-\)  governor" "Prov sec \(-\)  all other standing committee" "\# of cases (1,000)" "\# of individuals (1,000)") mgroup("Public Appearances" "Disciplinary Investigations", pattern(1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) ///
stats( yfe r2_a  N, labels("Province, year FE and province trends" "Adjusted R$^2$" "Number of Provinces" "Observations") fmt(0 2 0) )






 

*************************************************************************************************
**************************	Table A.19: Difference in substantive performance *******************************
*************************************************************************************************

xtset provid year
eststo clear
eststo m1: xtreg   F.gdpidx     i.year c.year##i.provid  connected psec_age psec_tenure loggdp logpop    psec_benke  ///
collegial     if year>=2000 ,fe  robust  cluster(provid)
estadd local yfe "$\checkmark$"
estadd local lde "$\checkmark$"

eststo m2: xtreg   F.gdp_2nd   i.year c.year##i.provid  connected psec_age psec_tenure loggdp logpop       psec_benke  ///
collegial     if year>=2000 ,fe  robust  cluster(provid)
estadd local yfe "$\checkmark$"
estadd local lde "$\checkmark$"

eststo m3: xtreg   F.gdp_3rd    i.year c.year##i.provid  connected psec_age psec_tenure loggdp logpop    psec_benke  ///
collegial     if year>=2000 ,fe  robust  cluster(provid)
estadd local yfe "$\checkmark$"
estadd local lde "$\checkmark$"

eststo m4: xtreg   F.growrev    i.year c.year##i.provid   connected psec_age psec_tenure loggdp logpop    psec_benke  ///
collegial     if year>=2000 ,fe  robust  cluster(provid)
estadd local yfe "$\checkmark$"
estadd local lde "$\checkmark$"

eststo m5: xtreg   F.growinvest i.year c.year##i.provid  connected psec_age psec_tenure loggdp logpop  psec_benke  ///
collegial     if year>=2000 ,fe  robust  cluster(provid)
estadd local yfe "$\checkmark$"
estadd local lde "$\checkmark$"


esttab m1 m2 m3 m4 m5  using out.txt, nonote nobaselevels  keep(collegial) b(3) se(3) ///
star(* 0.1 ** 0.05 *** 0.01) label booktabs replace   ///
mtitles("Overall GDP" "Industrial GDP" "Service GDP" "Revenue" "Investment") mgroup("Growth in ...", pattern(1 0 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) ///
stats( yfe lde r2_a  N, labels("Province, year FE and province trends" "Leadership and economic controls" "Adjusted R$^2$"  "Observations") fmt(0 0 2 0) )



********************************************************************************************************
**************************	Figure A.3: Determinants of Missing Comment *******************************
********************************************************************************************************

egen firstyear=min(year),by(psec)
g psec_first=year==firstyear
g eth=ethnicity!="����" & ethnicity!="NA"
g zb_year=year-psec_firstzb 
g zb_share=zb_year/psec_age



reg anycomment i.year psec_age zb_year   pb  anypurge psec_benke   loggdp logpop   muni   south coast  ///
if psec_first==1 , robust  
expmat rep2 // export regression coefficients for plotting //
